﻿using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace Matrix.MaKaYunShang.Model.MatrixCloudApi
{
    public class MxApiWeChatMsgRev
    {
        /// <summary>
        /// 自增ID
        /// </summary>	
        [DataMember(Name = "Id")]
        [Display(Name = "自增ID")]
        public int Id { get; set; }

        /// <summary>
        /// 公众号ID
        /// </summary>	
        [DataMember(Name = "WechatInfoId")]
        [Display(Name = "公众号ID")]
        public int WechatInfoId { get; set; }

        /// <summary>
        /// 开发者微信号
        /// </summary>	
        [DataMember(Name = "ToUserName")]
        [Display(Name = "开发者微信号")]
        public string ToUserName { get; set; }

        /// <summary>
        /// 发送方帐号（一个 OpenID）
        /// </summary>	
        [DataMember(Name = "FromUserName")]
        [Display(Name = "发送方帐号（一个 OpenID）")]
        public string FromUserName { get; set; }

        /// <summary>
        /// 消息创建时间 （整型）。
        /// </summary>	
        [DataMember(Name = "CreateTime")]
        [Display(Name = "消息创建时间 （整型）。")]
        public string CreateTime { get; set; }

        /// <summary>
        /// 消息类型
        /// 事件 event
        /// 消息 text
        /// 图片 image
        /// 视频 video
        /// 小视频 shortvideo
        /// 地理位置 location
        /// 链接 link
        /// </summary>	
        [DataMember(Name = "MsgType")]
        [Display(Name = "消息类型")]
        public string MsgType { get; set; }

        #region 事件BASIC
        /// <summary>
        /// 事件类型
        /// 用户未关注时，进行关注后的事件推送 subscribe(关注) unsubscribe(取消订阅)
        /// 用户已关注时的事件推送 SCAN
        /// 上报地理位置事件 LOCATION
        /// 自定义菜单事件 CLICK
        /// 点击菜单跳转链接时的事件推送 VIEW
        /// </summary>	
        [DataMember(Name = "Event")]
        [Display(Name = "事件类型")]
        public string Event { get; set; }

        /// <summary>
        /// 事件KEY值，
        /// 用户未关注时，进行关注后的事件推送： qrscene_为前缀，后面为二维码的参数值
        /// 用户已关注时的事件推送：是一个32位无符号整数，即创建二维码时的二维码scene_id
        /// 自定义菜单事件：事件KEY值，与自定义菜单接口中KEY值对应
        /// 点击菜单跳转链接时的事件推送： 事件KEY值，设置的跳转URL
        /// </summary>	
        [DataMember(Name = "EventKey")]
        [Display(Name = "事件KEY值")]
        public string EventKey { get; set; }
        #endregion

        #region Event扫描带参数二维码事件
        /// <summary>
        /// 二维码的ticket，可用来换取二维码图片
        /// </summary>	
        [DataMember(Name = "Ticket")]
        [Display(Name = "二维码的ticket")]
        public string Ticket { get; set; }
        #endregion

        #region Event地理位置
        /// <summary>
        ///地理位置纬度
        /// </summary>	
        [DataMember(Name = "Latitude")]
        [Display(Name = "地理位置纬度")]
        public string Latitude { get; set; }

        /// <summary>
        ///地理位置经度
        /// </summary>	
        [DataMember(Name = "Longitude")]
        [Display(Name = "地理位置经度")]
        public string Longitude { get; set; }

        /// <summary>
        ///地理位置精度
        /// </summary>	
        [DataMember(Name = "Precision")]
        [Display(Name = "地理位置精度")]
        public string Precision { get; set; }
        #endregion

        #region Event卡券
        /// <summary>
        /// 卡券 ID
        /// </summary>	
        [DataMember(Name = "CardId")]
        [Display(Name = "卡券 ID")]
        public string CardId { get; set; }


        /// <summary>
        /// 卡券 ID
        /// </summary>	
        [DataMember(Name = "IsGiveByFriend")]
        [Display(Name = "卡券 ID")]
        public string IsGiveByFriend { get; set; }

        /// <summary>
        /// code 序列号。自定义code及非自定义 code的卡券被领取后都支持事件推送
        /// </summary>	
        [DataMember(Name = "UserCardCode")]
        [Display(Name = "code 序列号。自定义code及非自定义 code的卡券被领取后都支持事件推送")]
        public string UserCardCode { get; set; }

        /// <summary>
        ///领取场景值，用于领取渠道数据统计。可在生成二维码接口及添加JS API 接口中自定义该字段的整型值
        /// </summary>	
        [DataMember(Name = "OuterId")]
        [Display(Name = "领取场景值，用于领取渠道数据统计。可在生成二维码接口及添加JS API 接口中自定义该字段的整型值")]
        public string OuterId { get; set; }

        /// <summary>
        /// 核销来源。支持开发者统计API核销（FROM_API）、公众平台核销（FROM_MP）、卡券商户助手核销（FROM_MOBILE_HELPER）（核销员微信号）
        /// </summary>
        public string ConsumeSource { get; set; }
        /// <summary>
        /// 微信支付交易订单号（只有使用买单功能核销的卡券才会出现）
        /// </summary>
        public string TransId { get; set; }

        /// <summary>
        /// 实付金额，单位为分
        /// </summary>
        public string Fee { get; set; }
        /// <summary>
        ///应付金额，单位为分
        /// </summary>
        public string OriginalFee { get; set; }
        /// <summary>
        /// 门店ID，当前卡券核销的门店ID（只有通过卡券商户助手和买单核销时才会出现）
        /// </summary>
        public string LocationId { get; set; }
        
        #endregion

        #region 普通消息BASIC
        /// <summary>
        /// 消息id，64位整型
        /// </summary>	
        [DataMember(Name = "MsgId")]
        [Display(Name = "消息id")]
        public long MsgId { get; set; }

        /// <summary>
        /// 图片消息/语音/视频媒体id，可以调用多媒体文件下载接口拉取数据
        /// </summary>	
        [DataMember(Name = "MediaId")]
        [Display(Name = "图片消息媒体id")]
        public string MediaId { get; set; }
        #endregion

        #region 文本普通信息
        /// <summary>
        /// 文本消息内容
        /// </summary>	
        [DataMember(Name = "Content")]
        [Display(Name = "文本消息内容")]
        public string Content { get; set; }

        #endregion

        #region 图片消息
        /// <summary>
        /// 图片链接
        /// </summary>	
        [DataMember(Name = "PicUrl")]
        [Display(Name = "图片链接")]
        public string PicUrl { get; set; }


        #endregion

        #region 语音消息
        /// <summary>
        /// 语音格式，如amr，speex等
        /// </summary>	
        [DataMember(Name = "Format")]
        [Display(Name = "语音格式")]
        public string Format { get; set; }

        #endregion

        #region 视频/小视频消息
        /// <summary>
        /// 视频消息缩略图的媒体id，可以调用多媒体文件下载接口拉取数据。
        /// </summary>	
        [DataMember(Name = "ThumbMediaId")]
        [Display(Name = "视频消息缩略图的媒体id")]
        public string ThumbMediaId { get; set; }

        #endregion

        #region 地理位置消息
        /// <summary>
        /// 地理位置纬度
        /// </summary>	
        [DataMember(Name = "Location_X")]
        [Display(Name = "地理位置纬度")]
        public string Location_X { get; set; }

        /// <summary>
        /// 地理位置经度
        /// </summary>	
        [DataMember(Name = "Location_Y")]
        [Display(Name = "地理位置经度")]
        public string Location_Y { get; set; }

        /// <summary>
        /// 地图缩放大小
        /// </summary>	
        [DataMember(Name = "Scale")]
        [Display(Name = "地图缩放大小")]
        public string Scale { get; set; }

        /// <summary>
        /// 地理位置信息
        /// </summary>	
        [DataMember(Name = "Label")]
        [Display(Name = "地理位置信息")]
        public string Label { get; set; }

        #endregion

        #region 链接消息
        /// <summary>
        /// 消息标题
        /// </summary>	
        [DataMember(Name = "Title")]
        [Display(Name = "消息标题")]
        public string Title { get; set; }

        /// <summary>
        /// 消息描述
        /// </summary>	
        [DataMember(Name = "Description")]
        [Display(Name = "消息描述")]
        public string Description { get; set; }

        /// <summary>
        /// 消息链接
        /// </summary>	
        [DataMember(Name = "Url")]
        [Display(Name = "消息链接")]
        public string Url { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [DataMember(Name = "IsDelete")]
        [Display(Name = "是否删除")]	
        public bool IsDelete { get; set; }
        #endregion
    }
}
